<template>
    <div class="message">
        <div class="box">
            <el-image class="close mouse-active" @click="close" :src="require('@/assets/img/close.png')"></el-image>
            <el-image class="box-image" :src="require('@/assets/img/message.png')"></el-image>
            <p class="message-title" :data-font="$i18n.locale">
                {{
                    $t('message.title')
                }}</p>
            <p class=" message-text" :data-font="$i18n.locale">{{
                $t('message.text')
            }}</p>
            <el-button class="message-btn" :data-font="$i18n.locale" @click="btn">{{
                $t('message.login')
            }}</el-button>
        </div>
    </div>
</template>

<script>
export default {
    methods: {
        close() {
            this.$store.commit("addMessage", false)
        },
        btn() {
            this.$store.commit("addMessage", false)
            this.$router.push('/login')
        }
    }
}
</script>

<style lang="less" scoped>
.message {
    z-index: 9999;
    width: 51.2rem;
    height: 100vh;
    background: rgba(197, 197, 202, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
}

.box {
    width: 21.33rem;
    height: 16rem;
    background: #FDFDFE;
    backdrop-filter: blur(20px);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;

    .box-image {
        width: 11.15rem;
        height: 9.73rem;
        position: absolute;
        left: 5.09rem;
        top: -2.51rem;
        z-index: 9;
    }

    .message-title {
        font-size: 1.17rem;
        font-weight: bold;
        color: #212121;
        line-height: 1.92rem;
        margin-top: 8rem;
    }

    .message-title[data-font='zh'] {
        font-family: 'AlibabaPuHuiTi-Bold', 'AlibabaPuHuiTi';
    }

    .message-title[data-font='en'] {
        font-family: 'RNSSanzSC-Bold, RNSSanzSC';
    }

    .message-text {
        margin-top: 0.64rem;
    }

    .message-text[data-font='zh'] {
        font-family: 'IdeaFonts-DianHei-DEJ', 'IdeaFonts-DianHei';
        font-size: 0.53rem;
        font-weight: normal;
        color: #68656C;
        line-height: 0.85rem;
    }

    .message-text[data-font='en'] {
        font-size: 0.48rem;
        font-family: 'Helvetica';
        color: #68656C;
        line-height: 0.75rem;
    }

    .message-btn {
        width: 16rem;
        height: 1.92rem;
        background: linear-gradient(315deg, rgba(38, 87, 255, 0.75) 0%, rgba(159, 34, 255, 0.75) 100%);
        border-radius: 0.21rem;
        backdrop-filter: blur(10px);
        margin-top: 1.33rem;

        :deep(span) {
            font-size: 0.64rem;
            font-weight: normal;
            color: #FFFFFF;
            line-height: 0.96rem;
        }
    }

    .message-btn[data-font='zh'] :deep(span) {
        font-family: 'IdeaFonts-DianHei-CEJ', 'IdeaFonts-DianHei';
    }

    .message-btn[data-font='en'] :deep(span) {
        font-family: 'Helvetica';
    }


    .close {
        width: 0.85rem;
        height: 0.85rem;
        position: absolute;
        top: 0.37rem;
        right: 0.37rem;
    }
}
</style>